package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by VegetaKo on 2017/1/3.
 */
@DynamicInsert
@Entity
@Table(name = "mall_good_base")
public class MallGoodBase extends BaseEntity {
    private String goodCode;
    private String goodCategory;
    private String goodType;
    private String goodExtra;
    private String name;
    private String content;
    private String descript;
    private String descriptM;
    private String logo;
    private String pictures;
    private String specification;
    private String aftersale;
    private Integer defaultPoint;
    private String unit;
    private Integer stock;
    private Integer sold;
    private Integer clicked;
    private Integer collected;
    private Integer recommend;
    private String remark;
    private String isHot;


    public enum MallGoodBase_{
        goodCode,goodCategory,goodType,goodExtra,name,descript,descriptM,logo,pictures,specification,aftersale,defaultPoint,stock,sold,clicked,collected,recommend,remark
    }

    @Basic
    @Column(name = "good_code", nullable = true, length = 16)
    public String getGoodCode() {
        return goodCode;
    }

    public void setGoodCode(String goodCode) {
        this.goodCode = goodCode;
    }

    @Basic
    @Column(name = "good_category", nullable = true, length = 16)
    public String getGoodCategory() {
        return goodCategory;
    }

    public void setGoodCategory(String goodCategory) {
        this.goodCategory = goodCategory;
    }

    @Basic
    @Column(name = "good_type", nullable = true, length = 8)
    public String getGoodType() {
        return goodType;
    }

    public void setGoodType(String goodType) {
        this.goodType = goodType;
    }

    @Basic
    @Column(name = "good_extra", nullable = true, length = 16)
    public String getGoodExtra() {
        return goodExtra;
    }

    public void setGoodExtra(String goodExtra) {
        this.goodExtra = goodExtra;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 64)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "descript", nullable = true, length = -1)
    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }

    @Basic
    @Column(name = "descript_m", nullable = true, length = -1)
    public String getDescriptM() {
        return descriptM;
    }

    public void setDescriptM(String descriptM) {
        this.descriptM = descriptM;
    }

    @Basic
    @Column(name = "logo", nullable = true, length = 64)
    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    @Basic
    @Column(name = "pictures", nullable = true)
    public String getPictures() {
        return pictures;
    }

    public void setPictures(String pictures) {
        this.pictures = pictures;
    }

    @Basic
    @Column(name = "specification", nullable = true, length = -1)
    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    @Basic
    @Column(name = "aftersale", nullable = true, length = -1)
    public String getAftersale() {
        return aftersale;
    }

    public void setAftersale(String aftersale) {
        this.aftersale = aftersale;
    }

    @Basic
    @Column(name = "default_point", nullable = true)
    public Integer getDefaultPoint() {
        return defaultPoint;
    }

    public void setDefaultPoint(Integer defaultPoint) {
        this.defaultPoint = defaultPoint;
    }

    @Basic
    @Column(name = "stock", nullable = true)
    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    @Basic
    @Column(name = "sold", nullable = true)
    public Integer getSold() {
        return sold;
    }

    public void setSold(Integer sold) {
        this.sold = sold;
    }

    @Basic
    @Column(name = "clicked", nullable = true)
    public Integer getClicked() {
        return clicked;
    }

    public void setClicked(Integer clicked) {
        this.clicked = clicked;
    }

    @Basic
    @Column(name = "collected", nullable = true)
    public Integer getCollected() {
        return collected;
    }

    public void setCollected(Integer collected) {
        this.collected = collected;
    }

    @Basic
    @Column(name = "recommend", nullable = true)
    public Integer getRecommend() {
        return recommend;
    }

    public void setRecommend(Integer recommend) {
        this.recommend = recommend;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "unit")
    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    @Basic
    @Column(name = "is_hot")
    public String getIsHot() {
        return isHot;
    }

    public void setIsHot(String isHot) {
        this.isHot = isHot;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MallGoodBase that = (MallGoodBase) o;

        if (goodCode != null ? !goodCode.equals(that.goodCode) : that.goodCode != null) return false;
        if (goodCategory != null ? !goodCategory.equals(that.goodCategory) : that.goodCategory != null) return false;
        if (goodType != null ? !goodType.equals(that.goodType) : that.goodType != null) return false;
        if (goodExtra != null ? !goodExtra.equals(that.goodExtra) : that.goodExtra != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (content != null ? !content.equals(that.content) : that.content != null) return false;
        if (descript != null ? !descript.equals(that.descript) : that.descript != null) return false;
        if (descriptM != null ? !descriptM.equals(that.descriptM) : that.descriptM != null) return false;
        if (logo != null ? !logo.equals(that.logo) : that.logo != null) return false;
        if (pictures != null ? !pictures.equals(that.pictures) : that.pictures != null) return false;
        if (specification != null ? !specification.equals(that.specification) : that.specification != null)
            return false;
        if (aftersale != null ? !aftersale.equals(that.aftersale) : that.aftersale != null) return false;
        if (defaultPoint != null ? !defaultPoint.equals(that.defaultPoint) : that.defaultPoint != null) return false;
        if (unit != null ? !unit.equals(that.unit) : that.unit != null) return false;
        if (stock != null ? !stock.equals(that.stock) : that.stock != null) return false;
        if (sold != null ? !sold.equals(that.sold) : that.sold != null) return false;
        if (clicked != null ? !clicked.equals(that.clicked) : that.clicked != null) return false;
        if (collected != null ? !collected.equals(that.collected) : that.collected != null) return false;
        if (recommend != null ? !recommend.equals(that.recommend) : that.recommend != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        return isHot != null ? isHot.equals(that.isHot) : that.isHot == null;
    }

    @Override
    public int hashCode() {
        int result = goodCode != null ? goodCode.hashCode() : 0;
        result = 31 * result + (goodCategory != null ? goodCategory.hashCode() : 0);
        result = 31 * result + (goodType != null ? goodType.hashCode() : 0);
        result = 31 * result + (goodExtra != null ? goodExtra.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (content != null ? content.hashCode() : 0);
        result = 31 * result + (descript != null ? descript.hashCode() : 0);
        result = 31 * result + (descriptM != null ? descriptM.hashCode() : 0);
        result = 31 * result + (logo != null ? logo.hashCode() : 0);
        result = 31 * result + (pictures != null ? pictures.hashCode() : 0);
        result = 31 * result + (specification != null ? specification.hashCode() : 0);
        result = 31 * result + (aftersale != null ? aftersale.hashCode() : 0);
        result = 31 * result + (defaultPoint != null ? defaultPoint.hashCode() : 0);
        result = 31 * result + (unit != null ? unit.hashCode() : 0);
        result = 31 * result + (stock != null ? stock.hashCode() : 0);
        result = 31 * result + (sold != null ? sold.hashCode() : 0);
        result = 31 * result + (clicked != null ? clicked.hashCode() : 0);
        result = 31 * result + (collected != null ? collected.hashCode() : 0);
        result = 31 * result + (recommend != null ? recommend.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (isHot != null ? isHot.hashCode() : 0);
        return result;
    }
}
